Previous Book Contents Book Index Next

Inside Macintosh: /
QuickDraw 3D RAVE / QuickDraw 3D RAVE Reference
QuickDraw 3D RAVE Routines / Manipulating Draw Contexts


QAFlush

You can use the QAFlush function to flush a draw context.

#define QAFlush(drawContext) (drawContext)->flush (drawContext)
drawContext
A draw context.
DESCRIPTION
The QAFlush function causes the drawing engine associated with the draw context specified by the drawContext parameter to begin rendering all drawing commands that are queued in a buffer awaiting processing. QuickDraw 3D RAVE allows a drawing engine to buffer as many drawing commands as desired. Accordingly, the successful completion of a drawing command (such as QADrawPoint) does not guarantee that the specified object is visible on the screen. You can call QAFlush to have a drawing engine start processing queued commands. Note, however, that QAFlush is not a blocking call--that is, the successful completion of QAFlush does not guarantee that all buffered commands have been processed. Calling QAFlush guarantees only that all queued commands will eventually be processed.

Typically, you should occasionally call QAFlush to update the screen image during a lengthy set of rendering operations in a single-buffered draw context. QAFlush has no visible effect when called on a double-buffered draw context, but it does initiate rendering to the back buffer.

The TQAFlush function returns a result code (of type TQAError) indicating whether any errors have occurred since the previous call to QARenderStart. If all rendering commands completed successfully, the value kQANoErr is returned. If any other value is returned, you should assume that the rendered image is incorrect.

SPECIAL CONSIDERATIONS
The QARenderEnd function automatically calls QAFlush.

SEE ALSO
To ensure that all buffered commands have been processed, you can call QASync instead of QAFlush.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
28 AUG 1996